/*
 * appli.java
 *
 * Created on 2 juin 2005, 08:38
 */

package ihm;
import learning.*;
import grapher.*;
import maze.*;

import javax.swing.*;
import java.util.*;
import javax.swing.event.ChangeEvent;

//import javax.swing.border.SoftBevelBorder;


/**
 *
 * @author De Loor  
 *
 */
public class LearningInMazeView extends javax.swing.JFrame {
    
    /** Creates new form appli */
    public LearningInMazeView() {
        super();
        initComponents();
        
        _mazePanel = new MazePanel();
        jPanel6.add(_mazePanel);
        _mazePanel.setPreferredSize(new java.awt.Dimension(210, 220));
        
	_memoryPanel = new MemoryPanel();
	this.jPanelMemorie.add(_memoryPanel);
        _memoryPanel.setPreferredSize(new java.awt.Dimension(210, 180));
        
        _grapher = new Grapher();  
        jPanelGrapher.add(_grapher.cPanel); // mip   
        
        _showMove = false;
       
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel6 = new javax.swing.JLabel();
        myPanel = new javax.swing.JPanel();
        jPanelMazes = new javax.swing.JPanel();
        jPanelRealMaze = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jRadioButtonMovingView = new javax.swing.JRadioButton();
        jPanel6 = new javax.swing.JPanel();
        jPanelMemorie = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jPanelInteraction = new javax.swing.JPanel();
        jPanelButton = new javax.swing.JPanel();
        jPanelAgentManagement = new javax.swing.JPanel();
        jComboAgentChoice = new javax.swing.JComboBox();
        jButtonAddAgent = new javax.swing.JButton();
        jPanelSchedulInform = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        jTextnbStep = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jTextEpisode = new javax.swing.JTextField();
        jPanelButtonSchedul = new javax.swing.JPanel();
        jButtonStop = new javax.swing.JButton();
        jButtonStart = new javax.swing.JButton();
        jButtonPause = new javax.swing.JButton();
        jButtonRewardChange = new javax.swing.JButton();
        jSlider4 = new javax.swing.JSlider();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jPanelGrapher = new javax.swing.JPanel();
        jPanelSlides = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jSlider1 = new javax.swing.JSlider();
        jLabel4 = new javax.swing.JLabel();
        jSlider3 = new javax.swing.JSlider();
        jLabel5 = new javax.swing.JLabel();
        jSlider2 = new javax.swing.JSlider();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jSeparator1 = new javax.swing.JSeparator();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItem3 = new javax.swing.JMenuItem();
        jMenuItem4 = new javax.swing.JMenuItem();

        jLabel6.setText("jLabel6");

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Sarsa Learning");
        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        myPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        myPanel.setMaximumSize(new java.awt.Dimension(700, 1000));
        myPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanelMazes.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelMazes.setMaximumSize(new java.awt.Dimension(700, 200));
        jPanelMazes.setMinimumSize(new java.awt.Dimension(700, 200));
        jPanelMazes.setPreferredSize(new java.awt.Dimension(700, 200));
        jPanelMazes.setLayout(new java.awt.GridLayout(1, 0));

        jPanelRealMaze.setMinimumSize(new java.awt.Dimension(32, 100));
        jPanelRealMaze.setLayout(new javax.swing.BoxLayout(jPanelRealMaze, javax.swing.BoxLayout.Y_AXIS));

        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Maze");
        jPanelRealMaze.add(jLabel1);

        jRadioButtonMovingView.setSelected(true);
        jRadioButtonMovingView.setText("View Moving");
        jRadioButtonMovingView.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonMovingViewActionPerformed(evt);
            }
        });
        jPanelRealMaze.add(jRadioButtonMovingView);
        jPanelRealMaze.add(jPanel6);

        jPanelMazes.add(jPanelRealMaze);

        jPanelMemorie.setMinimumSize(new java.awt.Dimension(68, 100));
        jPanelMemorie.setLayout(new javax.swing.BoxLayout(jPanelMemorie, javax.swing.BoxLayout.Y_AXIS));

        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Memory");
        jPanelMemorie.add(jLabel3);

        jPanelMazes.add(jPanelMemorie);

        myPanel.add(jPanelMazes, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 710, 180));

        jPanelInteraction.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelInteraction.setMaximumSize(new java.awt.Dimension(700, 400));
        jPanelInteraction.setMinimumSize(new java.awt.Dimension(700, 400));
        jPanelInteraction.setPreferredSize(new java.awt.Dimension(600, 400));
        jPanelInteraction.setLayout(new java.awt.GridLayout(1, 0));

        jPanelButton.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelButton.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jPanelAgentManagement.setLayout(new javax.swing.BoxLayout(jPanelAgentManagement, javax.swing.BoxLayout.LINE_AXIS));

        jComboAgentChoice.setMaximumSize(new java.awt.Dimension(500, 24));
        jComboAgentChoice.setMinimumSize(new java.awt.Dimension(30, 24));
        jComboAgentChoice.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jComboAgentChoiceItemStateChanged(evt);
            }
        });
        jComboAgentChoice.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboAgentChoiceActionPerformed(evt);
            }
        });
        jPanelAgentManagement.add(jComboAgentChoice);

        jButtonAddAgent.setText("Add Agent");
        jButtonAddAgent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jaddAgentActionPerformed(evt);
            }
        });
        jPanelAgentManagement.add(jButtonAddAgent);

        jPanelButton.add(jPanelAgentManagement, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 270, 30));

        jLabel7.setText("steps");
        jPanelSchedulInform.add(jLabel7);

        jTextnbStep.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        jTextnbStep.setText("0");
        jTextnbStep.setMaximumSize(new java.awt.Dimension(80, 30));
        jTextnbStep.setMinimumSize(new java.awt.Dimension(80, 20));
        jTextnbStep.setPreferredSize(new java.awt.Dimension(80, 20));
        jPanelSchedulInform.add(jTextnbStep);

        jLabel8.setText("|  essai");
        jPanelSchedulInform.add(jLabel8);

        jTextEpisode.setText("0");
        jTextEpisode.setMaximumSize(new java.awt.Dimension(70, 30));
        jTextEpisode.setMinimumSize(new java.awt.Dimension(70, 20));
        jTextEpisode.setPreferredSize(new java.awt.Dimension(70, 20));
        jPanelSchedulInform.add(jTextEpisode);

        jPanelButton.add(jPanelSchedulInform, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 80, 290, 30));

        jPanelButtonSchedul.setMaximumSize(new java.awt.Dimension(200, 200));
        jPanelButtonSchedul.setMinimumSize(new java.awt.Dimension(50, 252));
        jPanelButtonSchedul.setPreferredSize(new java.awt.Dimension(150, 150));
        jPanelButtonSchedul.setLayout(new javax.swing.BoxLayout(jPanelButtonSchedul, javax.swing.BoxLayout.LINE_AXIS));

        jButtonStop.setText("Stop");
        jButtonStop.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStopActionPerformed(evt);
            }
        });
        jPanelButtonSchedul.add(jButtonStop);

        jButtonStart.setText("Start");
        jButtonStart.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonStartActionPerformed(evt);
            }
        });
        jPanelButtonSchedul.add(jButtonStart);

        jButtonPause.setText("Pause");
        jButtonPause.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPauseActionPerformed(evt);
            }
        });
        jPanelButtonSchedul.add(jButtonPause);

        jPanelButton.add(jPanelButtonSchedul, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 10, 230, 40));

        jButtonRewardChange.setText("Reward Change");
        jButtonRewardChange.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonRewardChangeActionPerformed(evt);
            }
        });
        jPanelButton.add(jButtonRewardChange, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 130, -1, -1));

        jSlider4.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jSlider4MouseDragged(evt);
            }
        });
        jPanelButton.add(jSlider4, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 140, 150, -1));

        jLabel9.setText("slow");
        jPanelButton.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 160, -1, -1));

        jLabel10.setText("fast");
        jPanelButton.add(jLabel10, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 160, -1, -1));

        jPanelInteraction.add(jPanelButton);

        myPanel.add(jPanelInteraction, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 200, 380, 190));

        jPanelGrapher.setMaximumSize(new java.awt.Dimension(700, 400));
        jPanelGrapher.setMinimumSize(new java.awt.Dimension(700, 400));
        jPanelGrapher.setPreferredSize(new java.awt.Dimension(700, 400));
        jPanelGrapher.setLayout(new javax.swing.BoxLayout(jPanelGrapher, javax.swing.BoxLayout.Y_AXIS));
        myPanel.add(jPanelGrapher, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 390, 700, 220));

        jPanelSlides.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelSlides.setMaximumSize(new java.awt.Dimension(395, 361));
        jPanelSlides.setMinimumSize(new java.awt.Dimension(395, 361));
        jPanelSlides.setPreferredSize(new java.awt.Dimension(395, 361));
        jPanelSlides.setLayout(new javax.swing.BoxLayout(jPanelSlides, javax.swing.BoxLayout.Y_AXIS));

        jLabel2.setText("epsilon - Taux d'Exploration");
        jPanelSlides.add(jLabel2);

        jSlider1.setMajorTickSpacing(25);
        jSlider1.setPaintLabels(true);
        jSlider1.setPaintTicks(true);
        jSlider1.setToolTipText("");
        jSlider1.setValue(30);
        jSlider1.setMaximumSize(new java.awt.Dimension(200, 42));
        jSlider1.setMinimumSize(new java.awt.Dimension(200, 42));
        jSlider1.setPreferredSize(new java.awt.Dimension(2000, 42));
        jSlider1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jSlider1MouseDragged(evt);
            }
        });
        jPanelSlides.add(jSlider1);

        jLabel4.setText("lambda - Taux de Recompense");
        jPanelSlides.add(jLabel4);

        jSlider3.setMajorTickSpacing(25);
        jSlider3.setPaintLabels(true);
        jSlider3.setPaintTicks(true);
        jSlider3.setValue(90);
        jSlider3.setMaximumSize(new java.awt.Dimension(200, 42));
        jSlider3.setMinimumSize(new java.awt.Dimension(200, 42));
        jSlider3.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jSlider3MouseDragged(evt);
            }
        });
        jPanelSlides.add(jSlider3);

        jLabel5.setText("alpha - Taux d'Apprentissage");
        jPanelSlides.add(jLabel5);

        jSlider2.setMajorTickSpacing(25);
        jSlider2.setPaintLabels(true);
        jSlider2.setPaintTicks(true);
        jSlider2.setValue(20);
        jSlider2.setMaximumSize(new java.awt.Dimension(200, 42));
        jSlider2.setMinimumSize(new java.awt.Dimension(200, 42));
        jSlider2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
            public void mouseDragged(java.awt.event.MouseEvent evt) {
                jSlider2MouseDragged(evt);
            }
        });
        jPanelSlides.add(jSlider2);

        myPanel.add(jPanelSlides, new org.netbeans.lib.awtextra.AbsoluteConstraints(408, 200, 320, 190));

        getContentPane().add(myPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 0, 740, 640));

        jMenuBar1.setFocusCycleRoot(true);

        jMenu1.setText("File");

        jMenuItem1.setText("Import Maze");
        jMenu1.add(jMenuItem1);
        jMenu1.add(jSeparator1);

        jMenuItem2.setText("Exit");
        jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem2ActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItem2);

        jMenuBar1.add(jMenu1);

        jMenu3.setText("Aide");
        jMenu3.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);

        jMenuItem3.setText("About");
        jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem3ActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItem3);

        jMenuItem4.setText("Help");
        jMenu3.add(jMenuItem4);

        jMenuBar1.add(jMenu3);

        setJMenuBar(jMenuBar1);
    }// </editor-fold>//GEN-END:initComponents

    private void jRadioButtonMovingViewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonMovingViewActionPerformed
// TODO add your handling code here:
        if(_showMove==false) 
            _showMove=true;
        else _showMove = false;
    }//GEN-LAST:event_jRadioButtonMovingViewActionPerformed

    private void jButtonRewardChangeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRewardChangeActionPerformed
// TODO add your handling code here:
        _application.rewardChange();
    }//GEN-LAST:event_jButtonRewardChangeActionPerformed

    private void jButtonStopActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStopActionPerformed
// TODO add your handling code here:
        _application.stopSimulation();
        
    }//GEN-LAST:event_jButtonStopActionPerformed

    private void jButtonStartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonStartActionPerformed
// TODO add your handling code here:
        _application.startSimulation();
    }//GEN-LAST:event_jButtonStartActionPerformed

    private void jButtonPauseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPauseActionPerformed
// TODO add your handling code here:
        _application.pauseSimulation();
        this.drawGraph();
    }//GEN-LAST:event_jButtonPauseActionPerformed

    private void jComboAgentChoiceItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboAgentChoiceItemStateChanged
// TODO add your handling code here:
        
        _application.changeSelectedAgent((String)jComboAgentChoice.getSelectedItem());
        this.repaint();
    }//GEN-LAST:event_jComboAgentChoiceItemStateChanged

    private void jComboAgentChoiceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jComboAgentChoiceActionPerformed
// TODO add your handling code here:
    }//GEN-LAST:event_jComboAgentChoiceActionPerformed

    private void jaddAgentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jaddAgentActionPerformed
// TODO add your handling code here:
        String name = JOptionPane.showInputDialog(null,"Nom de l'agent ?","Agent ajout�",3);
        if((name != null) && (!name.equals("")) ) {
            jComboAgentChoice.addItem(name);
            _application.addAgent(name);
            jComboAgentChoice.setSelectedItem(name);
            _showMove=true;
        }
    }//GEN-LAST:event_jaddAgentActionPerformed

    private void jSlider3MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jSlider3MouseDragged
        // TODO add your handling code here:
         float fps = (int)jSlider3.getValue();
	        if (_application != null)
                     if (_application.getLearner() != null)
                           _application.getLearner().setLambda(fps/100);
    }//GEN-LAST:event_jSlider3MouseDragged

    private void jSlider2MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jSlider2MouseDragged
        // TODO add your handling code here:
         float fps = (int)jSlider2.getValue();
	        if (_application != null)
                     if (_application.getLearner() != null)
                           _application.getLearner().setAlpha(fps/100);
        
    }//GEN-LAST:event_jSlider2MouseDragged

    private void jSlider1MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jSlider1MouseDragged
        // TODO add your handling code here:
         float fps = (int)jSlider1.getValue();
	        if (_application != null)
                     if (_application.getLearner() != null)
                           _application.getLearner().setEpsilon(fps/100);
    }//GEN-LAST:event_jSlider1MouseDragged

    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
        // TODO add your handling code here:
        //exitActionPerformed(evt);
    }//GEN-LAST:event_jMenuItem2ActionPerformed

    private void jMenuItem3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem3ActionPerformed
        // TODO add your handling code here:
        JOptionPane.showMessageDialog(null,"Made by CERV - LI2");
    }//GEN-LAST:event_jMenuItem3ActionPerformed

    private void jSlider4MouseDragged(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jSlider4MouseDragged
        // TODO add your handling code here:
         float fps = (int)jSlider4.getValue();
	        if (_application != null)
                     if (_application.getLearner() != null)
                           _application.getLearner().setSlow((long)fps);
    }//GEN-LAST:event_jSlider4MouseDragged
    
    
    
    public Application getApplication(){
		return(_application);
	}
    
    public void setApplication(Application application){
		_application = application;
		_mazePanel.setApplication(_application);
		_memoryPanel.setApplication(_application);
                _grapher.setApplication(_application);
	}
	
    public void refreshOnlyMaze(){
		_mazePanel.paint(_mazePanel.getGraphics());
		//repaint();
	}
    
    
	
    public void eraseLearner(){
        if(this._showMove==true)
		_mazePanel.eraseLearner();	
	}
	
    public void drawLearner(){
        if(this._showMove==true)
            _mazePanel.drawLearner();
        repaint();
    }

    public void drawMemory(){
        _memoryPanel.repaint();//drawMemory(); //Jonathan Winterflood 18sept2006
    }

    public void drawGraph(){
       _grapher.RefreshGraph();
       repaint();
    }
	
    public void setNbStep(int n){
		jTextnbStep.setText(String.valueOf(n));
	}
    public void setNbEpisode(int n){
		jTextEpisode.setText(String.valueOf(n));
	}
    
    
    public void setNewInformations(SarsaSituatedAgent agent)
    {
        jSlider1.setValue((int)(agent.getEpsilon()*100));
        jSlider2.setValue((int)(agent.getAlpha()*100));    
        jSlider3.setValue((int)(agent.getLambda()*100));
        setNbStep(agent.getCompteur());
        setNbEpisode(agent.getNbEpisode());
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    public javax.swing.JButton jButtonAddAgent;
    public javax.swing.JButton jButtonPause;
    public javax.swing.JButton jButtonRewardChange;
    public javax.swing.JButton jButtonStart;
    public javax.swing.JButton jButtonStop;
    public javax.swing.JComboBox jComboAgentChoice;
    public javax.swing.JLabel jLabel1;
    public javax.swing.JLabel jLabel10;
    public javax.swing.JLabel jLabel2;
    public javax.swing.JLabel jLabel3;
    public javax.swing.JLabel jLabel4;
    public javax.swing.JLabel jLabel5;
    public javax.swing.JLabel jLabel6;
    public javax.swing.JLabel jLabel7;
    public javax.swing.JLabel jLabel8;
    public javax.swing.JLabel jLabel9;
    public javax.swing.JMenu jMenu1;
    public javax.swing.JMenu jMenu3;
    public javax.swing.JMenuBar jMenuBar1;
    public javax.swing.JMenuItem jMenuItem1;
    public javax.swing.JMenuItem jMenuItem2;
    public javax.swing.JMenuItem jMenuItem3;
    public javax.swing.JMenuItem jMenuItem4;
    public javax.swing.JPanel jPanel6;
    public javax.swing.JPanel jPanelAgentManagement;
    public javax.swing.JPanel jPanelButton;
    public javax.swing.JPanel jPanelButtonSchedul;
    public javax.swing.JPanel jPanelGrapher;
    public javax.swing.JPanel jPanelInteraction;
    public javax.swing.JPanel jPanelMazes;
    public javax.swing.JPanel jPanelMemorie;
    public javax.swing.JPanel jPanelRealMaze;
    public javax.swing.JPanel jPanelSchedulInform;
    public javax.swing.JPanel jPanelSlides;
    public javax.swing.JRadioButton jRadioButtonMovingView;
    public javax.swing.JSeparator jSeparator1;
    public javax.swing.JSlider jSlider1;
    public javax.swing.JSlider jSlider2;
    public javax.swing.JSlider jSlider3;
    public javax.swing.JSlider jSlider4;
    public javax.swing.JTextField jTextEpisode;
    public javax.swing.JTextField jTextnbStep;
    public javax.swing.JPanel myPanel;
    // End of variables declaration//GEN-END:variables

    private MazePanel _mazePanel;
    private MemoryPanel _memoryPanel;
    private Application _application;
    private Grapher _grapher;
    private boolean _showMove;
}
